<?php
use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\Course */

$this->title = $model->name . '-尚好课络资源共享';
$this->registerCssFile('/css/embed.default.css');
$this->registerCssFile('/css/main-mobile.css');
$this->registerCssFile('/css/font-awesome.min.css');
$this->params['breadcrumbs'][] = [
    'label' => '课程中心-' . $class[$model->cid],
    'url' => [
        'index',
        'class' => $model->cid
    ]
];

$this->registerMetaTag([
    'name' => 'keywords',
    'content' => $this->title . '-尚好课'
]);
$this->registerMetaTag([
    'name' => 'description',
    'content' => mb_strimwidth(strip_tags($model->message), 0, 80, '...')
]);

?>
<section class="container">
	<div class="content-wrap">
		<div class="content">
			<div class="article-header">
				<h1 class="article-title">
					<?=$model->name?>
				</h1>
				<div class="article-meta">
					<span class="item"><?=date('Y-m-d H:i:s',$model->create_at)?></span>
					<span class="item">分类：<a
						href="/course/index.html?class=<?=$model->cid?>"
						rel="category tag"><?=$class[$model->cid]?></a></span> <span
						class="item post-views">阅读(<?=$model->look?>)</span> <span
						class="item"></span>
				</div>
			</div>
			<article class="article-content">
				
			<?=$model->message?>
				
				<p></p>
				<!-- 				<p class="post-copyright"> -->
				<!-- 					转载请注明出处。<a href="http://www.sahaoke.com">尚好课</a> » <a -->

				<!-- 				</p> -->
			</article>
			<?php if($num>0):?>
			<div class="huoduan_hide_box"
				style="border: 1px dashed #F60; padding: 10px; margin: 10px 0; line-height: 200%; color: #F00; background-color: #FFF4FF; overflow: hidden; clear: both;">
				下载链接：<?=$model->link?>
			</div>
			<?php else:?>
			<div style='border: 1px solid red; padding: 5px; text-align: center;'>
				<span calss='label label-primary col-md-6 col-sm-6 col-xs-6'>本课程需要支付<?=$model->price?>尚好币</span>
				<span class='follow btn btn-xs btn-success'
					onclick='pay("<?=$model->id?>")'>点击支付</span>
			</div>
			<?php endif;?>
			
			
			<div class="bdsharebuttonbox" data-tag="share_1">
				<a class="bds_bdysc">分享到：</a> <a class="bds_sqq" data-cmd="sqq"></a>
				<a class="bds_qzone" data-cmd="qzone"></a> <a class="bds_tsina"
					data-cmd="tsina"></a> <a class="bds_baidu" data-cmd="baidu"></a> <a
					class="bds_renren" data-cmd="renren"></a> <a class="bds_tqq"
					data-cmd="tqq"></a> <a class="bds_douban" data-cmd="douban"></a> <a
					class="bds_weixin" data-cmd="weixin"></a> <a class="bds_tieba"
					data-cmd="tieba"></a> <a class="bds_mail" data-cmd="mail"></a> <a
					class="bds_isohu" data-cmd="isohu"></a> <a class="bds_ty"
					data-cmd="ty"></a> <a class="bds_fbook" data-cmd="fbook"></a> <a
					class="bds_huaban" data-cmd="huaban"></a> <a class="bds_more"
					data-cmd="more">更多</a>
			</div>
			<div class="huoduan_hide_box"
				style="border: 1px dashed #F60; padding: 10px; margin: 10px 0; line-height: 200%; color: #F00; background-color: #FFF4FF; overflow: hidden; clear: both;">

				1、<a href="http://www.sahaoke.com/" rel="nofollow"><font
					color="#FF6600">尚好课</font></a>为非营利性网站，全站所有资料仅供网友个人学习使用，禁止商用<br>
				2、本站所有文档、视频、书籍等资料均由网友分享，本站只负责收集不承担任何技术及版权问题<br>
				3、如本帖侵犯到任何版权问题，请立即告知本站，本站将及时予与删除下载链接并致以最深的歉意<br>

			</div>
			<!-- 
			<script>
	window._bd_share_config = {
		common : {
			bdText : '<?=$this->title?>',	
			bdText : '<?=$this->title?>',		
			bdPic : 'https://www.sahaoke.com/<?=$model->logo?>',
			bdStyle:1
		},
		share : [{
			"bdSize" : 16
		}],
		slide : [{	   
			bdImg : 1,
			bdPos : "right",
			bdTop : 100
		}],
		image : [{
			viewType : 'list',
			viewPos : 'top',
			viewColor : 'black',
			viewSize : '16',
			viewList : ['qzone','tsina','huaban','tqq','renren']
		}],
		selectShare : [{
			"bdselectMiniList" : ['qzone','tqq','kaixin001','bdxc','tqf']
		}]
	}
	console.log(new Date());
	with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='https://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>
 -->
			<div class="asb asb-m asb-post asb-post-02"></div>
			<div class="relates">
				<div class="title">
					<h3>相关推荐</h3>
				</div>
				<ul>
				<?php foreach ($new as $val):?>
					<li><a href="/course/view/<?=$val['id']?>.html"><?=$val['name']?></a></li>
				<?php endforeach;?>
				</ul>
			</div>
			<a name="comments"></a>



			<script type="text/javascript">
	if (typeof DUOSHUO !== 'undefined')
		DUOSHUO.EmbedThread('.ds-thread');
</script>
			<div id="ds-ssr">


				<ol id="commentlist">
				</ol>


			</div>
		</div>
	</div>
	<aside class="sidebar">

		<div class="widget widget_ui_posts">
			<h3>热门推荐</h3>
			<ul class="nopic">
				<?php foreach($hot as $val):?>
				<li><a target="_blank" href="/course/view/<?=$val['id']?>.html"><span
						class="text"><?=$val['name']?></span><span class="muted"><?=date('Y-m-d',$val['create_at'])?></span><span
						class="muted">分类:<?=$class[$val['cid']]?></span></a></li>
				<?php endforeach;?>
			</ul>
		</div>
		<script>
if (typeof DUOSHUO !== 'undefined')
	DUOSHUO.RecentComments && DUOSHUO.RecentComments('.ds-recent-comments');
</script>
		<div class="widget widget_ui_statistics">
			<h3>课程分类</h3>
			<ul>
			<?php foreach ($class as $key=>$val):?>
				<li><a href='/course/index.html?class=<?=$key?>'><strong><?=$val?></strong></a></li>
			<?php endforeach;?>
			</ul>
		</div>
	</aside>
</section>
